﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace cmsservice.Common
{
    public class RegexTools
    {
        public static bool StartWith(string input,string regexStr)
        {
            return Regex.IsMatch(input, regexStr + "[\\s\\S]*", RegexOptions.IgnoreCase);
        }

        public static bool Contains(string str,params string [] arr)
        {
            string reg = "[\\s\\S]*";
            foreach (var c in arr)
            {
                reg += c;
                reg += "[\\s\\S]*";
            }
            return Regex.IsMatch(str, reg, RegexOptions.IgnoreCase);
        }
    }
}
